Minimized Thompson NFA

نویسنده

  • Guangming Xing
چکیده

The problem of converting a regular expression to NFA is a fundamental problem that has been well studied. However, the two basic construction algorithms: (1) Thompson, (2) McNaughton-Yamada and Glushkov, both have disadvantages. In this paper: First, a “smart” parsing algorithm is developed which constructs a parse tree with at most (3l − 1) nodes form a regular expression with l literals; Second, we propose an algorithm that works on the resulting NFA from Thompson’s construction, eliminating as many auxiliary states as possible while maintaining Thompson’s properties. It is shown that the resulting NFA is minimized. This means that no auxiliary states can be eliminated without violating the defining properties of Thompson NFA. The time and space requirement for the above algorithms are linear with respect to the length of the regular expression. To the author’s knowledge, this is the first linear time algorithm minimizing an NFA in a precise technical sense.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Fast Regular Expression Matching Based On Dual Glushkov NFA

This paper presents a new regular expression matching method by using Dual Glushkov NFA. Dual Glushkov NFA is the variant of Glushkov NFA, and it has the strong property that all the outgoing transitions to a state of it have the same labels. We propose the new matching method Look Ahead Matching that suited to Dual Glushkov NFA structure. This method executes NFA simulation with reading two in...

متن کامل

Fast Regular Expression Matching Using Dual Glushkov NFA

This paper presents a new regular expression matching method by using Dual Glushkov NFA. Dual Glushkov NFA is the variant of Glushkov NFA, and it has the strong property that all the outgoing edges to a state of it have the same labels. We propose the new matching method Look Ahead Matching that suited to Dual Glushkov NFA structure. This method executes NFA simulation with reading two input ch...

متن کامل

New Theoretical and Computational Results For RegularLanguages

We show how to turn a regular expression into an O(s) space representation of McNaughton and Yamada's NFA, where s is the number of NFA states. The standard adjacency list representation of McNaughton and Yamada's NFA takes up s+s 2 space in the worst case. The adjacency list representation of the NFA produced by Thompson takes up between 2r and 5r space, where r s in general, and can be arbitr...

متن کامل

From Regular Expressions to DFA's Using Compressed NFA's

There are two principal methods for turning regular expressions into NFA’s one due to McNaughton and Yamada and another due to Thompson. Unfortunately, both have drawbacks. Given a regular expression R of length r and with s occurrences of alphabet symbols, Chang and Paige (1992) and Briiggemamr-Klein (1993) gave O(m + r) time and O(r) space algorithms to produce a O(m) space representation of ...

متن کامل

Fast Bit-Parallel Matching for Network and Regular Expressions

In this paper, we extend the SHIFT-AND approach by BaezaYates and Gonnet (CACM 35(10), 1992) to the matching problem for network expressions, which are regular expressions without Kleene-closure and useful in applications such as bioinformatics and event stream processing. Following the study of Navarro (RECOMB, 2001) on the extended string matching, we introduce new operations called Scatter, ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Int. J. Comput. Math.

دوره 81  شماره 

صفحات  -

تاریخ انتشار 2004